// pid.h
#ifndef __PID_H
#define __PID_H

typedef struct {
    float Kp, Ki, Kd;
    float integral;
    float prev_error;
    float setpoint;
    float output_limit;
} PIDController;

void PID_Init(PIDController *pid, float Kp, float Ki, float Kd, float output_limit);
float PID_Compute(PIDController *pid, float measured, float dt);

#endif